# -*- coding:utf-8 -*-
"""
@file: Student.py
@Description:  拥有name和age属性
@author: Yu Wenjie
@email : yuwenjie@cetc-cloud.com
@version: 
@date: 2017/10/18 13:21
"""


class Student(object):
    """
    __slots__ = ('age',)
    def __init__(self,age):
        self.__age=age

    #对age属性的GET操作
    @property
    def age(self):
        return self.__age

    @age.setter
    def age(self,age):
        self.__age=age

    def print_age(self):
        print self.age
    """

    def __init__(self, name, age):
        self.__name = name
        self.__age = age

    def print_info(self):
        print  ("name: %s  and age : %d" % (self.__name,self.__age))

if __name__=="__main__":
    s=Student('yuwenjie',20)
    s.print_info()
